﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using SynoManager.GUI;

namespace SynoManager.DownloadStation.Plugins
{
    public partial class RapidShareOptionsPanel : PreferencesPanel
    {
        private readonly RapidSharePlugin plugin;

        public RapidShareOptionsPanel()
        {
            InitializeComponent();
        }

        public RapidShareOptionsPanel(RapidSharePlugin plugin)
            :this()
        {
            this.plugin = plugin;

            usernameTextBox.Text = plugin.Username;
            passwordTextBox.Text = plugin.Password;
        }

        public override void Save()
        {
            plugin.Username = usernameTextBox.Text;
            plugin.Password = passwordTextBox.Text;
        }
    }
}
